{% extends '::admin.html.twig' %} 
{% block title %}
    Администраторская часть
{% endblock %}
{% block body %}
<h1>Staff creation</h1>

<form action="{{ path('admin_staff_create') }}" method="post" {{ form_enctype(form) }}>
        <div class="form_fieldset">
      {{ form_label(form.name) }}
      {{ form_widget(form.name, {'attr': {'class': 'text' } }) }}
    </div>
    <div class="form_fieldset">
      {{ form_label(form.file) }}
      {{ form_widget(form.file) }}
    </div>
    <div class="form_fieldset">
      {{ form_label(form.description) }}
      {{ form_widget(form.description, {'attr': {'class': 'tinymce', 'tinymce': '{"theme":"simple"}' } }) }}
    </div>
    <div class="form_fieldset">
      {{ form_label(form.category) }}
      {{ form_widget(form.category, {'attr': {'class': 'text' } }) }}
    <a href="{{ path('admin_staff_category') }}">Добавить категорию</a>
    </div>
    <div class="form_fieldset">
      {{ form_label(form.firm) }}
      {{ form_widget(form.firm, {'attr': {'class': 'text' } }) }}
      <a href="{{ path('admin_firms_new') }}">Добавить Фирму</a>
    </div>
      {{ form_rest(form) }}
    <p>
        <button type="submit">Create</button>
    </p>
</form>

<ul class="record_actions">
    <li>
        <a href="{{ path('admin_staff') }}">
            Back to the list
        </a>
    </li>
</ul>
{% endblock %}
{% block post_javascripts %}
  {{ parent() }}
  {{ tinymce_init() }}
  <script type="text/javascript">
  $(document).ready(function(){
    $('button').button();
  });
  </script>
{% endblock %}